package com.itheima.string;

import com.itheima.domain.Student;

import java.util.Scanner;

public class StringMethod07 {
    /*
    使用split方法实现字符串的切割
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入学生信息:");
        String s = sc.next();

        String[] arr = s.split(",");

        Student stu = new Student(arr[0],arr[1]);
        System.out.println(stu.getName()+"..."+stu.getAge());
    }
}
